package com.example.com.daervideo.initerface;

import io.reactivex.Observable;

import com.example.com.daervideo.activitys.users.InviteCodeActivity;
import com.example.com.daervideo.entity.BaseListEntity;
import com.example.com.daervideo.entity.BaseListEntity;
import com.example.com.daervideo.entity.FansAndFollowNum;
import com.example.com.daervideo.entity.InviteQQWeChat;
import com.example.com.daervideo.entity.UserData;
import com.example.com.daervideo.entity.VideoEntity;

import me.goldze.mvvmhabit.http.BaseResponse;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by i7-1 on 2018/11/22.
 */

public interface ApiService {


    @POST("regeist/userRegesit")
//注册
    Observable<BaseResponse<BaseListEntity>> userRegesit(@Query("phone") String phone, @Query("pwd") String pwd, @Query("shortMessageCode") String code,
                                                         @Query("inviteCode") String inviteCode, @Query("comeFrom") String comeFrom);

    @GET("shortMessage/sendRegCode")
        //注册验证码
    Observable<BaseResponse<BaseListEntity>> getRegistCode(@Query("phone") String phone);

    @GET("shortMessage/sendLoginCode")
//登录验证码
    Observable<BaseResponse<BaseListEntity>> sendLoginCode(@Query("phone") String phone);

    @POST("user/login")
//登录
    Observable<BaseResponse<BaseListEntity>> login(@Query("phone") String phone, @Query("pwd") String password, @Query("code") String code);

    @GET("shortMessage/sendResetPwdCode")
        //重置忘记验证码
    Observable<BaseResponse<BaseListEntity>> sendResetCode(@Query("phone") String phone);

    @POST("regeist/resetPwd")
        //重置密码
    Observable<BaseResponse<BaseListEntity>> resetPws(@Query("phone") String phone, @Query("code") String code, @Query("newPwd") String newPwdBODY);

    @POST("fans/myFollowList")
//我的关注pageSize, page
    Observable<BaseResponse<BaseListEntity>> myAttention(@Query("pageSize") int pageSize, @Query("page") int pageItems);

    @POST("fans/myFansList")
//我的粉丝
    Observable<BaseResponse<BaseListEntity>> myFans(@Query("pageSize") int pageSize, @Query("page") int pageItems);

    @GET("fans/addFans")
//关注
    Observable<BaseResponse<BaseListEntity>> action_disAttetion(@Query("userId") String userId);

    @GET("fans/removeFans")
        //取消关注
    Observable<BaseResponse<BaseListEntity>> action_attetion(@Query("userId") String userId);

    //我的发布
    @POST("mine/myDeploy")
    Observable<BaseResponse<BaseListEntity>> mydeploy(@Query("userId") int userId, @Query("page") int pageNO, @Query("pageSize") int pageSize);

    //mine/rewardList
    @POST("mine/rewardList")
    Observable<BaseResponse<BaseListEntity>> rewardList(@Query("userId") int userId, @Query("page") int pageNO, @Query("pageSize") int pageSize);

    @POST("mine/editName")
    Observable<BaseResponse<BaseListEntity>> editName(@Query("newName") String newName, @Query("userId") String userId);

    @POST("mine/editSign")
    Observable<BaseResponse<BaseListEntity>> editSign(@Query("sign") String sign, @Query("userId") String userId);

    @POST("user/getUserInfo")
    Observable<BaseResponse<UserData>> getUserInfo(@Query("userId") String userinfo);

    @POST("mine/basicInfo")
    Observable<BaseResponse<UserData>> getMineInfo();

    @POST("inform/informType")
    Observable<BaseResponse<BaseListEntity>> getComplain();

    @POST("inform/addInform")
    Observable<BaseResponse<BaseListEntity>> complain(@Query("informerId") String informerId, @Query("beInformerId") String beInformerId
            , @Query("informTypeId") String informTypeId, @Query("informName") String informName);


    @POST("fans/getFansAndFollowNum")
    Observable<BaseResponse<FansAndFollowNum>> getFansAndFollowNum();

    @POST("fans/getUserFansAndFollowNum")
    Observable<BaseResponse<FansAndFollowNum>> getFansAndFollowNum(@Query("userId") String userinfo);

    @POST("")
    Observable<BaseResponse<BaseListEntity>> getMyInviteFriends(@Query("page") int page, @Query("pageSize") int pageSize);

    @POST("regeist/getInviteQQGroupAndWeChat")
    Observable<BaseResponse<InviteQQWeChat>> getQQAndWeChat();

    @POST("video/getHomePageVideoList")
    Observable<BaseResponse<BaseListEntity<VideoEntity>>> getVideoList(@Query("page") int page, @Query("pageSize") int pageSize);

}
